// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 此处后端没有提供注释 PUT /interface */
export async function updateInterfaceInfo(
  body: API.InterfaceInfoVo,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponse>('/api/interface', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /interface */
export async function addInterfaceInfo(
  body: API.InterfaceInfoAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponse>('/api/interface', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 DELETE /interface */
export async function deleteInterfaceInfos(
  body: API.InterfaceInfoVo[],
  options?: { [key: string]: any },
) {
  return request<API.BaseResponse>('/api/interface', {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /interface/ */
export async function getInterfaceVoById(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getInterfaceVoByIdParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponse>('/api/interface/', {
    method: 'GET',
    params: {
      ...params,
      idRequest: undefined,
      ...params['idRequest'],
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /interface/list/page/all */
export async function listAllInterfaceInfoByPage(
  body: API.InterfaceInfoQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseIPageInterfaceInfoVo>('/api/interface/list/page/all', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /interface/list/page/online */
export async function listOnlineInterfaceInfoByPage(
  body: API.InterfaceInfoQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseIPageInterfaceInfoVo>('/api/interface/list/page/online', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /interface/offline */
export async function offlineInterface(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.offlineInterfaceParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponse>('/api/interface/offline', {
    method: 'POST',
    params: {
      ...params,
      idRequest: undefined,
      ...params['idRequest'],
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /interface/online */
export async function onlineInterface(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.onlineInterfaceParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponse>('/api/interface/online', {
    method: 'POST',
    params: {
      ...params,
      idRequest: undefined,
      ...params['idRequest'],
    },
    ...(options || {}),
  });
}
